const { DataTypes } = require("sequelize");
const sequelize = require("./index");

const EtymologyType = sequelize.define(
	"etymology_type",
	{
		id: {
			type: DataTypes.INTEGER,
			primaryKey: true,
			allowNull: false,
			autoIncrement: true,
		},
		title: {
			type: DataTypes.STRING,
			allowNull: false,
		},
	},
	{
		timestamps: false,
	}
);

EtymologyType.associate = ({ etymology }) => {
	EtymologyType.hasMany(etymology);
};

module.exports = EtymologyType;
